//
//  BGBuyerOrderDetailModel.m
//  bigMall
//
//  Created by LTOVE on 16/9/9.
//  Copyright © 2016年 thinklev. All rights reserved.
//

#import "BGBuyerOrderDetailModel.h"
#import "MJExtension.h"
@implementation BGBuyerOrderDetailModel

@end

@implementation BGBuyerOrderDetailResModel

- (NSString *)status
{
    if ([self.is_comment isEqualToString:@"1"]) {
        return @"8";
    }else{
        return _status;
    }
}
+ (NSDictionary *)replacedKeyFromPropertyName
{
    return @{
             @"idStr":@"id",
             @"user_info":@"shop_info",
//             @"check_report":@"check_report_info",
             };
}

@end

@implementation BGBuyerOrderDetailOriginalDataModel

+ (NSDictionary *)objectClassInArray
{
    return @{
             
             @"attr":@"BGBuyerOrderDetailIdAndValueModel"
             
             };
    
}


@end

@implementation BGBuyerOrderDetailIdAndValueModel



@end



@implementation BGBuyerOrderDetailGoodsInfo

+ (NSDictionary *)objectClassInArray
{
    return @{
             
             @"goods_attrs":@"BGGoodAttrsModel",
             @"check_report_info":@"store_pic_info",
             @"store_pic_info":@"store_pic_info"
             };
    
}

- (NSArray *)pay_scaleArray
{
    return  [self.pay_scale componentsSeparatedByString:@","];
}

//+ (NSArray *)getPay_scale
//{
//    return  [self.pay_scale componentsSeparatedByString:@","];
//}
//- (NSString *)cat_name
//{
//    return [NSString stringWithFormat:@"分类:%@",_cat_name];
//}
//
//- (NSString *)title
//{
//    return [NSString stringWithFormat:@"品名:%@",_title];
//}
//- (NSString *)price
//{
//    return [NSString stringWithFormat:@"价格:%@",_price];
//}
//
//-(NSString *)total_price
//{
//    return [NSString stringWithFormat:@"总价:%@",_total_price];
//}
//- (NSString *)publish_type_str
//{
//    return [NSString stringWithFormat:@"挂单方式:%@",_publish_type_str];
//}
//- (NSString *)pay_type_str
//{
//    return [NSString stringWithFormat:@"支付方式:%@",_pay_type_str];
//}
//- (NSString *)end_time_format
//{
//    return [NSString stringWithFormat:@"结束日期:%@",_end_time_format];
//}
//- (NSString *)delivery_type_str
//{
//    return [NSString stringWithFormat:@"交割方式:%@",_delivery_type_str];
//}
//-(NSString *)delivery_area
//{
//    return [NSString stringWithFormat:@"交割地:%@",_delivery_area];
//}

- (NSDictionary *)getDictWithTitle:(NSString *)title andValue:(NSString *)value
{
    return @{
             @"title":title,
             @"value":value
             };
    //    return [NSString stringWithFormat:@"%@:%@",title,value];
}

- (NSArray *)getBasicInfoArray
{
    return @[[self getDictWithTitle:@"分类" andValue:_cat_name],
             [self getDictWithTitle:@"品名" andValue:_title],
             [self getDictWithTitle:@"数量" andValue:[NSString stringWithFormat:@"%@ %@",_number,_unit]],
             
             [self getDictWithTitle:@"价格" andValue:[NSString stringWithFormat:@"%@ 元",_price]],
             [self getDictWithTitle:@"总价" andValue:[NSString stringWithFormat:@"%@ 元",_total_price]],
             
             [self getDictWithTitle:@"挂单方式" andValue:_publish_type_str],
             [self getDictWithTitle:@"付款方式" andValue:_pay_method_str],
             [self getDictWithTitle:@"支付方式" andValue:_pay_type_str],
             [self getDictWithTitle:@"结束日期" andValue:_end_time_format],
             [self getDictWithTitle:@"交割方式" andValue:_delivery_type_str],
             [self getDictWithTitle:@"交割地" andValue:_delivery_area]
             ];
}


@end

@implementation BGBuyerOrderDetailUserInfoModel


+ (NSDictionary *)replacedKeyFromPropertyName
{
    return @{
             @"phone":@"mobile",
             @"name":@"nickname",
             };
}

@end

@implementation BGBuyerOrderDetailShopInfo


+ (NSDictionary *)replacedKeyFromPropertyName
{
    return @{
             @"phone":@"mobile",
             @"name":@"nickname",
             };
}

@end
@implementation store_pic_info



@end
